package org.jeecg.modules.hc.job;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.hc.service.IHcOrderMerchantService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 订单、返现和门店状态处理计划任务
 *
 * @Author Scott
 */
@Slf4j
public class HcUpdOrderStateJob implements Job {

    @Autowired
    private IHcOrderMerchantService hcOrderMerchantService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("订单、返现和门店状态处理计划任务：" + jobExecutionContext.getJobDetail().getKey());
        hcOrderMerchantService.orderJob();
        log.info(String.format("订单、返现和门店状态处理计划任务完成时间:" + DateUtils.now()));
    }
}
